﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin/Admin.Master" Inherits="System.Web.Mvc.ViewPage<ShopOnline.Models.Catelogy>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <link href="../../Content/Styles/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine-en.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine.js" type="text/javascript"></script>
         <script>
             jQuery(document).ready(function () {
                 // binds form submission and fields to the validation engine
                 jQuery("#formID").validationEngine();
             });         
        </script>
<div class="w_container m10-tb  fl">
        <div class="w_container fl">
            <div class="titleheader bold fl">
                Administration Session
            </div>
            <div class="titleheader fr">
                Back to <a class="orange" href="/Admin/Index">Cpanel</a></div>
            <div class="w_container titleheader fl align-l">
                <div class="fl">
                    Cpanel |
                </div>
                <div class="orange fl">
                    Thay đổi Chủ đề
                </div>
            </div>
        </div>
       <div class="w_container m10-tb  fl">
            <div class="sub_container fl">
                <form method="post" enctype="multipart/form-data" id="formID" class="formular" >
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Tên chủ đề 
                    </div>
                    <div class="input-item fl">
                       <input type="text" name="catelogyName" id="catelogyName" class="validate[required]" value="<%= Model.catelogyName %>"/>
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                        Sơ lược
                    </div>
                    <div class="input-item fl">
                         <textarea name="description" id="description" class="validate[required]" style = "width: 99%; height:150px;"><%=Model.description %></textarea>
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Nội dung
                    </div>
                    <div class="input-item fl">
                        <textarea name="body" id="body" class="validate[required]" style = "width: 99%; height:150px;"><%= Model.body %></textarea>
                    </div>
                </div>
               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Độ ưu tiên 
                    </div>
                    <div class="input-item fl">
                         <input type="text" name="piority" id="piority" class="validate[required,custom[integer]] text-input" value="<%=Model.piority %>"/>
                    </div>
                </div>
               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Đường dẫn 
                    </div>
                    <div class="input-item fl">
                       <input type="text" name="url" id="url" class="validate[required]" value="<%=Model.url %>" />
                    </div>
                </div>
               <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Đường dẫn ảnh
                    </div>
                    <div class="input-item fl">
                     <img src="../../Content/CatelogyImages/<%=Model.imagePath %>" height="150px" width="150px" />
                       <%= Html.ActionLink("EditImage", "EditImage", new { id = Model.catelogyId }, new { @class = "ui-state-default ui-corner-all button fl" })%>
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Điểu chỉnh chủ đề con
                    </div>
                    <div class="input-item fl">
                        <%=Html.CheckBox("enableModifyChirldren", Model.enableModifyChirldren)%>
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                       Chủ đề cha
                    </div>
                    <div class="input-item align-l fl">
                                        <select id="Select1" name="fatherId">
                     <% foreach (var item in (List<ShopOnline.Models.Catelogy>)ViewData["listCatelogy"])
                                     {
                                         if (item.catelogyId==Model.fartherId)
                                         {%>
                                         <option value="<%= item.catelogyId%>" selected="selected"><%=item.catelogyName %></option>
                                         <%    
}
                                         else
                                         {%>
                                         <option value="<%= item.catelogyId%>" ><%=item.catelogyName %></option>
                                         <%                                             
                                         }%>
                       
                     <% 
                    } %>
                 </select>
                        
                    </div>
                </div>
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                        Hiển thị
                    </div>
                    <div class="input-item fl">
                       <%=Html.CheckBox("show",Model.show) %>
                    </div>
                </div>
                
                <div class=" w_container fl m5-tb">
                    <div class=" title-item fl">
                        &nbsp;
                    </div>
                    <div class="input-item fl">
                        <input type="submit" value="Lưu" class="ui-state-default ui-corner-all button fl" />
                        <a class="ui-state-default ui-corner-all button fl" href="/Catelogy/AdminListCatelogy">
                            Hủy Bỏ </a>
                    </div>
                </div>
                </form>
            </div>
        </div>
    </div>
</asp:Content>

